// 验证回文串

var isPalindrome = function (s) {
  let _s = "";
  for (const e of s) {
    const code = e.charCodeAt();
    if ((code >= 65 && code <= 90) || (code >= 48 && code <= 57)) {
      _s += e.toLowerCase();
    } else if (code >= 97 && code <= 122) {
      _s += e;
    }
  }
  for (let n = 0; n < _s.length; n++) {
    if (_s.charAt(n) !== _s.charAt(_s.length - 1 - n)) return false;
  }
  return true;
};

const ans = isPalindrome("0p");
console.log("ans: ", ans);
